package errcode

import "git.myscrm.cn/golang/common/ykerrcode"

// 第一位数字表示类型，第二～第四位表示模块，第五到第八位表示具体场景错误码
const (
	COMMON_ERROR               = 20010000
	COMMON_DATA_NOT_EXIST      = 20010001
	COMMON_PARAMS_ERROR        = 20010002
	COMMON_TOKEN_ERROR         = 20010003 //token过期
	COMMON_USER_IDENTITY_ERROR = 20010004
	COMMON_USER_TOKEN_EXPIRED  = 20010005
	COMMON_TENANT_CODE_ERROR   = 20019999

	COMMON_NO_PERMISSION         = 20010005 // 无权限
	COMMON_USER_BIND_FAIL        = 20010006
	COMMON_USER_UNBIND           = 20010007
	COMMON_USER_FORBIDDEN        = 20010008
	COMMON_USER_BINDED           = 20010009
	COMMON_USER_LOGIN_PWD_FAILED = 20010011 // 账号密码登录失败
	COMMON_USER_LOGIN_CNT_FAILED = 20010012 // 账号密码登录失败多次需要验证码

	REPORT_MY_LIST_TRANS_FAILED = 20020001 // 结构体转换失败
	REPORT_MY_LIST_GET_RECORD   = 20020002 // 结构体转换失败

	VERIFY_CODE_GENERATE_FAILED = 20020003 // 生成验证码错误
	// CustomerNotExistError 客户详情不存在错误码
	CustomerNotExistError = 20200001

	OutboundCompanyIdNotExistError = 20400001
	OutboundHasNoProfitError       = 20400002

	// 导出订单
	OrderNoAvailableExportNumError = 20500001

	USER_LOGIN_ACCOUNT_LOCKED                   = 20100000
	USER_ACCOUNT_NOT_EXISIT                     = 20100001
	USER_LOGIN_VERIFY_PASSWORD_ERROR            = 20100002
	USER_LOGIN_SAVE_STATUS_ERROR                = 20100003
	USER_LOGIN_SMS_CODE_ERROR                   = 20100004
	USER_RESET_PASSWORD_ERROR                   = 20100005
	USER_LOGIN_NEED_CAPTCHA                     = 20100006
	USER_LOGIN_GET_RESET_PASSWOD_TOKEN          = 20100007
	USER_RESET_PASSWORD_TEMP_TOKEN_ERROR        = 20100008
	USER_SAVE_PASSWORD_ERROR                    = 20100009
	USER_IS_FORBID                              = 20100010
	USER_ISSUE_TOKEN_ERROR                      = 20100011
	USER_SAVE_LOGIN_ERROR                       = 20100012
	USER_LOGIN_NOT_FOUND                        = 20100013
	USER_SAVE_LOGIN_CACHE_ERROR                 = 20100014
	USER_LOGOUT_TOKEN_ERROR                     = 20100015
	USER_LOGOUT_TOKEN_CACHE_ERROR               = 20100016
	USER_GET_LOGIN_ERROR                        = 20100017
	USER_LOGIN_REFRESH_TOKEN_UNEXPIRE_ERROR     = 20100018
	USER_LOGIN_REFRESH_UPDATE_TOKEN_ERROR       = 20100019
	USER_LOGIN_REFRESH_UPDATE_TOKEN_CACHE_ERROR = 20100020
	USER_SYNC_NOT_FOUND_DATA                    = 20100021
	USER_SYNC_DEL_ERROR                         = 20100022
	USER_SYNC_UPDATE_ERROR                      = 20100023 //无可用导出数量
)

func init() {
	dict := map[interface{}]string{
		COMMON_TOKEN_ERROR: "token过期",
	}
	ykerrcode.RegisterErrMsg(dict)
}
